package com.ruoyi.system.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.support.Convert;
import com.ruoyi.system.domain.WdyNotice;
import com.ruoyi.system.mapper.WdyNoticeMapper;
import com.ruoyi.system.service.IWdyNoticeService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 新闻公告 服务层实现
 * 
 * @author ruoyi
 * @date 2019-10-25
 */
@Service
public class WdyNoticeServiceImpl extends ServiceImpl<WdyNoticeMapper, WdyNotice> implements IWdyNoticeService
{
	/**
     * 查询新闻公告信息
     * 
     * @param id 新闻公告ID
     * @return 新闻公告信息
     */
    @Override
	public WdyNotice selectWdyNoticeById(Long id)
	{
	    return baseMapper.selectWdyNoticeById(id);
	}
	
	/**
     * 查询新闻公告列表
     * 
     * @param wdyNotice 新闻公告信息
     * @return 新闻公告集合
     */
	@Override
	public List<WdyNotice> selectWdyNoticeList(WdyNotice wdyNotice)
	{
	    return baseMapper.selectWdyNoticeList(wdyNotice);
	}
	public List<WdyNotice> getWdyNoticeList(WdyNotice wdyNotice){
		return baseMapper.getWdyNoticeList(wdyNotice);
	}

    /**
     * 新增新闻公告
     * 
     * @param wdyNotice 新闻公告信息
     * @return 结果
     */
	@Override
	public int insertWdyNotice(WdyNotice wdyNotice)
	{
	    return baseMapper.insertWdyNotice(wdyNotice);
	}
	
	/**
     * 修改新闻公告
     * 
     * @param wdyNotice 新闻公告信息
     * @return 结果
     */
	@Override
	public int updateWdyNotice(WdyNotice wdyNotice)
	{
	    return baseMapper.updateWdyNotice(wdyNotice);
	}

	/**
     * 删除新闻公告对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteWdyNoticeByIds(String ids)
	{
		return baseMapper.deleteWdyNoticeByIds(Convert.toStrArray(ids));
	}
	
}
